/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.Date;
import java.util.Random;

/**
 * <p>Project: jse2302 - Ex7
 * <p>Powered by webrx On 2023-06-13 09:34:49
 * <p>Created by IntelliJ IDEA
 *
 * @author  webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex8 {
    public static void main(String[] args) {
        //2023 1 1 0 0 0 - now 随机10日期
        var rand = new Random();
        var ss = LocalDateTime.of(2023, 1, 1, 0, 0, 0).toInstant(ZoneOffset.of("+08:00")).toEpochMilli();
        var ee = System.currentTimeMillis() + 1;
        for (int i = 0; i < 10; i++) {
            long time = rand.nextLong(ss, ee);
            Date d = new Date(time);
            System.out.printf("(%2d)、%tF %<tT %<tA %<tp %<tB%n", i + 1, d);
        }
    }
}
